#ifndef __EPSILON_3D__VIEWPORT_H__
#define __EPSILON_3D__VIEWPORT_H__

struct eRect;

class e3dViewport {
public:
  e3dViewport (void) : _width  (0),
                       _height (0),
                       _x      (0),
                       _y      (0) { };

  e3dViewport (int width, int height) : _width  (width),
                                        _height (height),
                                        _x      (0),
                                        _y      (0) { };

  void Resize (const eRect& rect);
  void Resize (int width, int height);

  /*
  operator const eRect (void) {
    eRect rect;

    rect.left = _x;
    rect.top  = _y;

    rect.right  = _x + _width;
    rect.bottom = _y + _height;

    return rect;
  }
  */

  int X (void) { return _x; };
  int Y (void) { return _y; };

  int Width  (void) { return _width;  };
  int Height (void) { return _height; };

  float AspectRatio (void) {
    return (float)_width / (float)_height;
  }

private:
  int _x;
  int _y;

  int _width;
  int _height;
};

#endif /* __EPSILON_3D__RENDERCONTEXT_H__ */
